import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { ConfigService } from './config.service';
import { Carousel } from '../model/carousel';

@Injectable()
export class CarouselService {

  constructor(private http:HttpClient,
    private config:ConfigService) { }



 private   addCarouselUrl=this.config.host+"/manage/addCarousel";
addCarousel(carousel:Carousel){

return this.http.post(this.addCarouselUrl,carousel).toPromise();

}

private  getCarouselListUrl=this.config.host+"/manage/getCarouselList";
getCarouselList(){



  return this.http.get(this.getCarouselListUrl).toPromise();
}



}
